
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Vue Refresh · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="vue-page-not-refresh.html" />
    
    
    <link rel="prev" href="teaching.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    前端进阶
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="Grid System.html">
            
                <a href="Grid System.html">
            
                    
                    Grid System
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="Handwritten signature.html">
            
                <a href="Handwritten signature.html">
            
                    
                    Handwritten Signature
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="Mobile Soft Keyboard.html">
            
                <a href="Mobile Soft Keyboard.html">
            
                    
                    Mobile Soft Keyboard
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="authentication.html">
            
                <a href="authentication.html">
            
                    
                    Authentication
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    Code
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" >
            
                <span>
            
                    
                    Four Operations
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="control loading.html">
            
                <a href="control loading.html">
            
                    
                    Control Loading
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="downfile.html">
            
                <a href="downfile.html">
            
                    
                    Downfile
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="dynamic-routing.html">
            
                <a href="dynamic-routing.html">
            
                    
                    Dynamic Routing
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="ecs.html">
            
                <a href="ecs.html">
            
                    
                    Ecs
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="engineering.html">
            
                <a href="engineering.html">
            
                    
                    Engineering
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="eslint-vscode-format.html">
            
                <a href="eslint-vscode-format.html">
            
                    
                    Eslint Vscode Format
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="eventloop.html">
            
                <a href="eventloop.html">
            
                    
                    Eventloop
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="four-operations-1.html">
            
                <a href="four-operations-1.html">
            
                    
                    Four Operations 1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="four-operations-2.html">
            
                <a href="four-operations-2.html">
            
                    
                    Four Operations 2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="four-operations-3.html">
            
                <a href="four-operations-3.html">
            
                    
                    Four Operations 3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18" data-path="four-operations-4.html">
            
                <a href="four-operations-4.html">
            
                    
                    Four Operations 4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.19" data-path="front end summary.html">
            
                <a href="front end summary.html">
            
                    
                    Front End Summary
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20" data-path="git commit style.html">
            
                <a href="git commit style.html">
            
                    
                    Git Commit Style
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.21" data-path="git-commands.html">
            
                <a href="git-commands.html">
            
                    
                    Git Commands
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.22" data-path="high-quality-code.html">
            
                <a href="high-quality-code.html">
            
                    
                    High Quality Code
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.23" data-path="history.html">
            
                <a href="history.html">
            
                    
                    History
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.24" data-path="html-tag.html">
            
                <a href="html-tag.html">
            
                    
                    Html Tag
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.25" data-path="http-https-http2.html">
            
                <a href="http-https-http2.html">
            
                    
                    Http Https Http2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.26" data-path="ignore log.html">
            
                <a href="ignore log.html">
            
                    
                    Ignore Log
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.27" >
            
                <span>
            
                    
                    Imgs
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.28" data-path="javascript-optimization.html">
            
                <a href="javascript-optimization.html">
            
                    
                    Javascript Optimization
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.29" data-path="local application.html">
            
                <a href="local application.html">
            
                    
                    Local Application
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.30" data-path="locality.html">
            
                <a href="locality.html">
            
                    
                    Locality
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.31" data-path="loop-unrolling.html">
            
                <a href="loop-unrolling.html">
            
                    
                    Loop Unrolling
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.32" data-path="mobile recommendation.html">
            
                <a href="mobile recommendation.html">
            
                    
                    Mobile Recommendation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.33" data-path="modal.html">
            
                <a href="modal.html">
            
                    
                    Modal
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.34" data-path="monitor.html">
            
                <a href="monitor.html">
            
                    
                    Monitor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.35" data-path="performance.html">
            
                <a href="performance.html">
            
                    
                    Performance
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.36" data-path="print-talbe.html">
            
                <a href="print-talbe.html">
            
                    
                    Print Talbe
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.37" data-path="promise.html">
            
                <a href="promise.html">
            
                    
                    Promise
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.38" data-path="teaching.html">
            
                <a href="teaching.html">
            
                    
                    Teaching
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.39" data-path="vue refresh.html">
            
                <a href="vue refresh.html">
            
                    
                    Vue Refresh
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.40" data-path="vue-page-not-refresh.html">
            
                <a href="vue-page-not-refresh.html">
            
                    
                    Vue Page Not Refresh
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.41" data-path="why-learn-theory.html">
            
                <a href="why-learn-theory.html">
            
                    
                    Why Learn Theory
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Vue Refresh</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="vue-&#x5B9E;&#x73B0;&#x524D;&#x8FDB;&#x5237;&#x65B0;&#xFF0C;&#x540E;&#x9000;&#x4E0D;&#x5237;&#x65B0;&#x7684;&#x6548;&#x679C;">Vue &#x5B9E;&#x73B0;&#x524D;&#x8FDB;&#x5237;&#x65B0;&#xFF0C;&#x540E;&#x9000;&#x4E0D;&#x5237;&#x65B0;&#x7684;&#x6548;&#x679C;</h1>
<h3 id="&#x9700;&#x6C42;&#x4E00;&#xFF1A;">&#x9700;&#x6C42;&#x4E00;&#xFF1A;</h3>
<p>&#x5728;&#x4E00;&#x4E2A;&#x5217;&#x8868;&#x9875;&#x4E2D;&#xFF0C;&#x7B2C;&#x4E00;&#x6B21;&#x8FDB;&#x5165;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x8BF7;&#x6C42;&#x83B7;&#x53D6;&#x6570;&#x636E;&#x3002;</p>
<p>&#x70B9;&#x51FB;&#x67D0;&#x4E2A;&#x5217;&#x8868;&#x9879;&#xFF0C;&#x8DF3;&#x5230;&#x8BE6;&#x60C5;&#x9875;&#xFF0C;&#x518D;&#x4ECE;&#x8BE6;&#x60C5;&#x9875;&#x540E;&#x9000;&#x56DE;&#x5230;&#x5217;&#x8868;&#x9875;&#x65F6;&#xFF0C;&#x4E0D;&#x5237;&#x65B0;&#x3002;</p>
<p>&#x4E5F;&#x5C31;&#x662F;&#x8BF4;&#x4ECE;&#x5176;&#x4ED6;&#x9875;&#x9762;&#x8FDB;&#x5230;&#x5217;&#x8868;&#x9875;&#xFF0C;&#x9700;&#x8981;&#x5237;&#x65B0;&#x83B7;&#x53D6;&#x6570;&#x636E;&#xFF0C;&#x4ECE;&#x8BE6;&#x60C5;&#x9875;&#x8FD4;&#x56DE;&#x5230;&#x5217;&#x8868;&#x9875;&#x65F6;&#x4E0D;&#x8981;&#x5237;&#x65B0;&#x3002;</p>
<p><strong>&#x89E3;&#x51B3;&#x65B9;&#x6848;</strong></p>
<p> &#x5728; <code>App.vue</code>&#x8BBE;&#x7F6E;&#xFF1A;</p>
<pre><code class="lang-html">        <span class="hljs-tag">&lt;<span class="hljs-name">keep-alive</span> <span class="hljs-attr">include</span>=<span class="hljs-string">&quot;list&quot;</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">router-view</span>/&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">keep-alive</span>&gt;</span>
</code></pre>
<p> &#x5047;&#x8BBE;&#x5217;&#x8868;&#x9875;&#x4E3A; <code>list.vue</code>&#xFF0C;&#x8BE6;&#x60C5;&#x9875;&#x4E3A; <code>detail.vue</code>&#xFF0C;&#x8FD9;&#x4E24;&#x4E2A;&#x90FD;&#x662F;&#x5B50;&#x7EC4;&#x4EF6;&#x3002;</p>
<p> &#x6211;&#x4EEC;&#x5728; <code>keep-alive</code> &#x6DFB;&#x52A0;&#x5217;&#x8868;&#x9875;&#x7684;&#x540D;&#x5B57;&#xFF0C;&#x7F13;&#x5B58;&#x5217;&#x8868;&#x9875;&#x3002;</p>
<p> &#x7136;&#x540E;&#x5728;&#x5217;&#x8868;&#x9875;&#x7684; <code>created</code> &#x51FD;&#x6570;&#x91CC;&#x6DFB;&#x52A0; ajax&#x8BF7;&#x6C42;&#xFF0C;&#x8FD9;&#x6837;&#x53EA;&#x6709;&#x7B2C;&#x4E00;&#x6B21;&#x8FDB;&#x5165;&#x5230;&#x5217;&#x8868;&#x9875;&#x7684;&#x65F6;&#x5019;&#x624D;&#x4F1A;&#x8BF7;&#x6C42;&#x6570;&#x636E;&#xFF0C;&#x5F53;&#x4ECE;&#x5217;&#x8868;&#x9875;&#x8DF3;&#x5230;&#x8BE6;&#x60C5;&#x9875;&#xFF0C;&#x518D;&#x4ECE;&#x8BE6;&#x60C5;&#x9875;&#x56DE;&#x6765;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x5217;&#x8868;&#x9875;&#x5C31;&#x4E0D;&#x4F1A;&#x5237;&#x65B0;&#x3002;
 &#x8FD9;&#x6837;&#x5C31;&#x53EF;&#x4EE5;&#x89E3;&#x51B3;&#x95EE;&#x9898;&#x4E86;&#x3002;</p>
<h3 id="&#x9700;&#x6C42;&#x4E8C;&#xFF1A;">&#x9700;&#x6C42;&#x4E8C;&#xFF1A;</h3>
<p> &#x5728;&#x9700;&#x6C42;&#x4E00;&#x7684;&#x57FA;&#x7840;&#x4E0A;&#xFF0C;&#x518D;&#x52A0;&#x4E00;&#x4E2A;&#x8981;&#x6C42;&#xFF1A;&#x53EF;&#x4EE5;&#x5728;&#x8BE6;&#x60C5;&#x9875;&#x4E2D;&#x5220;&#x9664;&#x5BF9;&#x5E94;&#x7684;&#x5217;&#x8868;&#x9879;&#xFF0C;&#x8FD9;&#x65F6;&#x8FD4;&#x56DE;&#x5230;&#x5217;&#x8868;&#x9875;&#x65F6;&#x9700;&#x8981;&#x5237;&#x65B0;&#x91CD;&#x65B0;&#x83B7;&#x53D6;&#x6570;&#x636E;&#x3002;</p>
<p> &#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x5728;&#x8DEF;&#x7531;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E0A;&#x5BF9; <code>detail.vue</code> &#x589E;&#x52A0;&#x4E00;&#x4E2A; <code>meta</code> &#x5C5E;&#x6027;&#x3002;</p>
<pre><code>         {
            path: &apos;/detail&apos;,
            name: &apos;detail&apos;,
            component: () =&gt; import(&apos;../view/detail.vue&apos;),
            meta: {isRefresh: true}
        },
</code></pre><p> &#x8FD9;&#x4E2A; <code>meta</code> &#x5C5E;&#x6027;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;&#x8BE6;&#x60C5;&#x9875;&#x4E2D;&#x901A;&#x8FC7; <code>this.$route.meta.isRefresh</code> &#x6765;&#x8BFB;&#x53D6;&#x548C;&#x8BBE;&#x7F6E;&#x3002;</p>
<p> &#x8BBE;&#x7F6E;&#x5B8C;&#x8FD9;&#x4E2A;&#x5C5E;&#x6027;&#xFF0C;&#x8FD8;&#x8981;&#x5728; <code>App.vue</code> &#x6587;&#x4EF6;&#x91CC;&#x8BBE;&#x7F6E; watch &#x4E00;&#x4E0B; <code>$route</code> &#x5C5E;&#x6027;&#x3002;</p>
<pre><code class="lang-js">     watch: {
        $route(to, <span class="hljs-keyword">from</span>) {
            <span class="hljs-keyword">const</span> fname = <span class="hljs-keyword">from</span>.name
            <span class="hljs-keyword">const</span> tname = to.name
            <span class="hljs-keyword">if</span> (<span class="hljs-keyword">from</span>.meta.isRefresh || (fname != <span class="hljs-string">&apos;detail&apos;</span> &amp;&amp; tname == <span class="hljs-string">&apos;list&apos;</span>)) {
                <span class="hljs-keyword">from</span>.meta.isRefresh = <span class="hljs-literal">false</span>
                    <span class="hljs-comment">// &#x5728;&#x8FD9;&#x91CC;&#x91CD;&#x65B0;&#x8BF7;&#x6C42;&#x6570;&#x636E;</span>
            }
        }
    },
</code></pre>
<p> &#x8FD9;&#x6837;&#x5C31;&#x4E0D;&#x9700;&#x8981;&#x5728;&#x5217;&#x8868;&#x9875;&#x7684; <code>created</code> &#x51FD;&#x6570;&#x91CC;&#x7528; ajax &#x6765;&#x8BF7;&#x6C42;&#x6570;&#x636E;&#x4E86;&#xFF0C;&#x7EDF;&#x4E00;&#x653E;&#x5728; <code>App.vue</code> &#x91CC;&#x6765;&#x5904;&#x7406;&#x3002;</p>
<p> &#x89E6;&#x53D1;&#x8BF7;&#x6C42;&#x6570;&#x636E;&#x6709;&#x4E24;&#x4E2A;&#x6761;&#x4EF6;&#xFF1A;</p>
<ol>
<li>&#x4ECE;&#x5176;&#x4ED6;&#x9875;&#x9762;&#xFF08;&#x9664;&#x4E86;&#x8BE6;&#x60C5;&#x9875;&#xFF09;&#x8FDB;&#x6765;&#x5217;&#x8868;&#x65F6;&#xFF0C;&#x9700;&#x8981;&#x8BF7;&#x6C42;&#x6570;&#x636E;&#x3002;</li>
<li>&#x4ECE;&#x8BE6;&#x60C5;&#x9875;&#x8FD4;&#x56DE;&#x5230;&#x5217;&#x8868;&#x9875;&#x65F6;&#xFF0C;&#x5982;&#x679C;&#x8BE6;&#x60C5;&#x9875; <code>meta</code> &#x5C5E;&#x6027;&#x4E2D;&#x7684; <code>isRefresh</code> &#x4E3A; <code>true</code>&#xFF0C;&#x4E5F;&#x9700;&#x8981;&#x91CD;&#x65B0;&#x8BF7;&#x6C42;&#x6570;&#x636E;&#x3002;</li>
</ol>
<p>&#x5F53;&#x6211;&#x4EEC;&#x5728;&#x8BE6;&#x60C5;&#x9875;&#x4E2D;&#x5220;&#x9664;&#x4E86;&#x5BF9;&#x5E94;&#x7684;&#x5217;&#x8868;&#x9879;&#x65F6;&#xFF0C;&#x5C31;&#x53EF;&#x4EE5;&#x5C06;&#x8BE6;&#x60C5;&#x9875; <code>meta</code> &#x5C5E;&#x6027;&#x4E2D;&#x7684; <code>isRefresh</code> &#x8BBE;&#x4E3A; <code>true</code>&#x3002;&#x8FD9;&#x65F6;&#x518D;&#x8FD4;&#x56DE;&#x5230;&#x5217;&#x8868;&#x9875;&#xFF0C;&#x9875;&#x9762;&#x4F1A;&#x91CD;&#x65B0;&#x5237;&#x65B0;&#x3002;</p>
<h4 id="&#x89E3;&#x51B3;&#x65B9;&#x6848;&#x4E8C;">&#x89E3;&#x51B3;&#x65B9;&#x6848;&#x4E8C;</h4>
<p>&#x5BF9;&#x4E8E;&#x9700;&#x6C42;&#x4E8C;&#x5176;&#x5B9E;&#x8FD8;&#x6709;&#x4E00;&#x4E2A;&#x66F4;&#x7B80;&#x6D01;&#x7684;&#x65B9;&#x6848;&#xFF0C;&#x90A3;&#x5C31;&#x662F;&#x4F7F;&#x7528; router-view &#x7684; <code>key</code> &#x5C5E;&#x6027;&#x3002;</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">keep-alive</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">router-view</span> <span class="hljs-attr">:key</span>=<span class="hljs-string">&quot;$route.fullPath&quot;</span>/&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">keep-alive</span>&gt;</span>
</code></pre>
<p>&#x9996;&#x5148; keep-alive &#x8BA9;&#x6240;&#x6709;&#x9875;&#x9762;&#x90FD;&#x7F13;&#x5B58;&#xFF0C;&#x5F53;&#x4F60;&#x4E0D;&#x60F3;&#x7F13;&#x5B58;&#x67D0;&#x4E2A;&#x8DEF;&#x7531;&#x9875;&#x9762;&#xFF0C;&#x8981;&#x91CD;&#x65B0;&#x52A0;&#x8F7D;&#x5B83;&#x65F6;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;&#x8DF3;&#x8F6C;&#x65F6;&#x4F20;&#x4E00;&#x4E2A;&#x968F;&#x673A;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x8FD9;&#x6837;&#x5B83;&#x5C31;&#x80FD;&#x91CD;&#x65B0;&#x52A0;&#x8F7D;&#x4E86;&#x3002;
&#x4F8B;&#x5982;&#x4ECE;&#x5217;&#x8868;&#x9875;&#x8FDB;&#x5165;&#x4E86;&#x8BE6;&#x60C5;&#x9875;&#xFF0C;&#x7136;&#x540E;&#x5728;&#x8BE6;&#x60C5;&#x9875;&#x4E2D;&#x5220;&#x9664;&#x4E86;&#x5217;&#x8868;&#x9875;&#x4E2D;&#x7684;&#x67D0;&#x4E2A;&#x9009;&#x9879;&#xFF0C;&#x6B64;&#x65F6;&#x4ECE;&#x8BE6;&#x60C5;&#x9875;&#x9000;&#x56DE;&#x5217;&#x8868;&#x9875;&#x65F6;&#x5C31;&#x8981;&#x5237;&#x65B0;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x8DF3;&#x8F6C;&#xFF1A;</p>
<pre><code class="lang-js"><span class="hljs-keyword">this</span>.$router.push({
    path: <span class="hljs-string">&apos;/list&apos;</span>,
    query: { <span class="hljs-string">&apos;randomID&apos;</span>: <span class="hljs-string">&apos;id&apos;</span> + <span class="hljs-built_in">Math</span>.random() },
})
</code></pre>
<p>&#x8FD9;&#x6837;&#x7684;&#x65B9;&#x6848;&#x76F8;&#x5BF9;&#x6765;&#x8BF4;&#x8FD8;&#x662F;&#x66F4;&#x7B80;&#x6D01;&#x7684;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="teaching.html" class="navigation navigation-prev " aria-label="Previous page: Teaching">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="vue-page-not-refresh.html" class="navigation navigation-next " aria-label="Next page: Vue Page Not Refresh">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Vue Refresh","level":"1.39","depth":1,"next":{"title":"Vue Page Not Refresh","level":"1.40","depth":1,"path":"前端进阶/vue-page-not-refresh.md","ref":"前端进阶/vue-page-not-refresh.md","articles":[]},"previous":{"title":"Teaching","level":"1.38","depth":1,"path":"前端进阶/teaching.md","ref":"前端进阶/teaching.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["summary","livereload"],"pluginsConfig":{"summary":{},"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"前端进阶/vue refresh.md","mtime":"2021-02-15T12:04:36.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-03-24T08:50:55.666Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

